package com.whfp.coky.ui.task.model

import android.graphics.Bitmap
import android.os.Parcel
import android.os.Parcelable

/**
 *
 *展示要打印的二维码 实体类
 * created by coky on 2022/3/31
 */
class PrintCodeBean() : Parcelable{
    var title: String? = null
    var content: String? = null
    var bitmap: Bitmap? = null

    constructor(parcel: Parcel) : this() {
        title = parcel.readString()
        content = parcel.readString()
        bitmap = parcel.readParcelable(Bitmap::class.java.classLoader)
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(title)
        parcel.writeString(content)
        parcel.writeParcelable(bitmap, flags)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<PrintCodeBean> {
        override fun createFromParcel(parcel: Parcel): PrintCodeBean {
            return PrintCodeBean(parcel)
        }

        override fun newArray(size: Int): Array<PrintCodeBean?> {
            return arrayOfNulls(size)
        }
    }
}